﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using nwrole.Module.lib;

namespace nwrole.TestModule
{
    class Program
    {
        static void Main(string[] args)
        {
            new ModuleStarter(new TestModule(), args);
        }
    }

    class TestModule : IModule
    {
        [ModuleConfig(Name = "ParentNode/SubNode")]
        public int TestSetting { get; set; }

        public void Start(IModuleDebug debug)
        {
            //debug.RegisterLogger(new ModuleFileLogger(LogLevel.Warning));
            debug.RegisterLogger(new ModuleConsoleLogger(LogLevel.Info));
            //debug.RegisterLogger(new ModuleEventLogger(LogLevel.Info));

            debug.Pulse("A little pulse");

            Trace.TraceInformation("Test setting: " + TestSetting);

            TestSetting = 5;
        }

        public void Stop()
        {
            Trace.TraceInformation("Stopping TestModule");
        }
    }
}
